package goods.service;

import org.springframework.data.domain.Pageable;

import common.dto.goodsdto.GoodsDTO;
import common.model.result.Result;
import common.model.goods.Category;
import common.model.goods.Sku;
import common.model.goods.Spu;

public interface IGoodsService {
    //前台
    Result findByShopId(Long shopId, String sort, Integer page, Integer pageSize);
    Result findGoodsById(Long id);  
    Result recommend();
    Result getCategory();
    //后台
    Result add(GoodsDTO goods);
    Result addSku(Sku sku);
    Result updateSpu(Spu spu);
    Result updateSku(Sku sku);
    Result delete(Long id);
    Result deleteSku(Long id);
    Result search(String data, Pageable pageable);
    Result findAttribute(Long id);
    Result findSku(Long id);
    Result findSpu(Long id);
    Result updateSkuStock(Sku sku);
    Result getGoodsList(Integer page, Integer pageSize);
    Result getCategoryList();
    Result getCategoryPercent();
    Result getSecondCategory();
    Result addCategory(Category category);
    Result updateCategory(Category category);
    Result deleteCategory(Long id);
    Result updateSpuStatus(Long id, Boolean status);
    
}
